﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace BSU.GraduateWork.Web.Models
{
    public class InputParametersModel
    {
        public static InputParametersModel Create()
        {
            return new InputParametersModel
                       {
                           N = 1000,
                           X1 = 0,
                           X2 = 1,
                           Y1 = 0,
                           Y2 = 1,
                           Z1 = 0,
                           Z2 = 1,
                           G = 0,
                           Epsilon = 0.0001,
                           H = 0.3,
                           Alpha = 0.00001
                       };
        }

        [Required]
        [DisplayName("n&nbsp;=")]
        public int N { get; set; }

        [Required]
        [Range(0, 1)]
        [DisplayName("x<sub>1</sub>&nbsp;=")]
        public double X1 { get; set; }

        [Required]
        [Range(0, 1)]
        [DisplayName("x<sub>2</sub>&nbsp;=")]
        public double X2 { get; set; }

        [Required]
        [Range(0, 1)]
        [DisplayName("y<sub>1</sub>&nbsp;=")]
        public double Y1 { get; set; }
        
        [Required]
        [Range(0, 1)]
        [DisplayName("y<sub>2</sub>&nbsp;=")]
        public double Y2 { get; set; }

        [Required]
        [Range(0, 1)]
        [DisplayName("z<sub>1</sub>&nbsp;=")]
        public double Z1 { get; set; }
        
        [Required]
        [Range(0, 1)]
        [DisplayName("z<sub>2</sub>&nbsp;=")]
        public double Z2 { get; set; }

        [Required]
        [DisplayName("g&nbsp;=")]
        public double G { get; set; }

        [Required]
        [DisplayName("&epsilon;&nbsp;=")]
        public double Epsilon { get; set; }
        
        [Required]
        [DisplayName("h&nbsp;=")]
        public double H { get; set; }
        
        [Required]
        [DisplayName("&alpha;&nbsp;=")]
        public double Alpha { get; set; }
    }
}
